<?php

namespace app\admin\model\line;

use think\Model;


class LineSpot extends Model
{

    

    

    // 表名
    protected $name = 'line_spot';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [
	    'line_tag_ids_text',
    ];
	
	function getLineTagIdsTextAttr($value,$data)
	{
		$ling_tag_ids = $value ?? ($data['line_tag_ids'] ?? '');
		$ret = LineTags::whereIn('id',$ling_tag_ids)->column('name');
		return implode(',', $ret);
	}
	
    

    







}
